package com.neusoft.neuiotms.dcom.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.validation.constraints.NotBlank;

import org.hibernate.validator.constraints.Length;

import com.neusoft.bizcore.web.jpa.model.AbstractAuditModel;
import com.neusoft.bizcore.web.jpa.model.Comment;

import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
@Entity
@Table(name = "neuiot_project")
@org.hibernate.annotations.Table(appliesTo = "neuiot_project", comment = "项目管理表")
public class Project extends AbstractAuditModel {

    private static final long serialVersionUID = 1L;

    /** 项目名称 */
    @NotBlank(message = "项目名称不能为空")
    @Length(max = 255, message = "项目名称不能超过{max}位")
    @Column(length = 255, nullable = false)
    @Comment("varchar(255) NOT NULL COMMENT '项目名称'")
    private String name;

    /** 项目编码 */
    @Length(max = 255, message = "项目编码不能超过{max}位")
    @Column(length = 255, nullable = false, unique = true)
    @Comment("varchar(255) NOT NULL COMMENT '项目编码'")
    private String code;

    /** 开始时间 */
    @Column(length = 6, nullable = false)
    @Comment("datetime(6) NOT NULL COMMENT '开始时间'")
    private Date startTime;

    /** 结束时间 */
    @Column(length = 6, nullable = false)
    @Comment("datetime(6) NOT NULL COMMENT '结束时间'")
    private Date endTime;

    /** 故障级别-普通问题催单时间 */
    private long slightPromptInteval = 30;
    /** 故障级别-紧急问题催单时间 */
    private long generalPromptInteval = 120;
    /** 故障级别-重大问题催单时间 */
    private long seriousPromptInteval = 120;
}
